package com.cskaoyan.model.bo.goods.create;

import com.fasterxml.jackson.annotation.JsonFormat;
import lombok.Data;

import java.math.BigDecimal;
import java.util.Date;
import java.util.List;

/**
 * @program: project-market
 * @description:
 * @author: Jesson Guo
 * @create: 2021-11-30 14:12
 **/
@Data
public class GoodsCreateGoodsBO {
    private String picUrl;
    private List<String> gallery;
    private boolean isHot;
    private boolean isNew;
    private boolean isOnSale;
    private String goodsSn;
    private String name;
    private BigDecimal counterPrice;
    private String unit;
    private String keywords;
    private long categoryId;
    private long brandId;
    private String brief;
    private String detail;
    private BigDecimal retailPrice;
    @JsonFormat(pattern="yyyy-MM-dd HH:mm:ss")
    private Date addTime;
    @JsonFormat(pattern="yyyy-MM-dd HH:mm:ss")
    private Date updateTime;
    private boolean deleted;



    public void setAddTime(Date addTime) {
        if (addTime==null){addTime=new Date();}
        this.addTime = addTime;
    }


    public void setUpdateTime(Date updateTime) {
        if (updateTime==null){updateTime=new Date();}
        this.updateTime = updateTime;
    }


    public void setDeleted(boolean deleted) {
        this.deleted = deleted;
    }
}
